Archetype.Templates.TalTemplate = Archetype.Class.create({
    initialize: function(template) {
        this.container=document.createElement("div");
        this.container.style.display='none';
        document.body.appendChild(this.container);
        this.container.innerHTML=template;
    },
    evaluate: function(params) {
        try {
            TAL.parse(this.container, params);
        } catch (e) {
            Logger.error(e);
        }
        var result=this.container.innerHTML;
        this.container=null;
        return result;
    }
});